package com.qian.service.ddj.entity;

import com.yaowk.service.common.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.ColumnDefault;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import java.util.Set;

@Getter
@Setter
@ToString
@Entity
public class DdjChannel extends BaseEntity<Integer> {

    private String name;
    @Column(unique = true, nullable = false)
    private String code;
    @ColumnDefault("0")
    private Byte cash;
    @ColumnDefault("0")
    private Byte register;

    @OneToMany(mappedBy = "channel")
    private Set<DdjBusinessGroup> businessGroups;
}
